# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin
#from django.contrib import admin
#admin.autodiscover()

urlpatterns = patterns('',
    # Example
    # (r'^gpxe/', include('gpxe.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation
    #(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin
    #(r'^admin/', include(admin.site.urls)),
    
    #Index - main page
    (r'^$', 'menubuilder.views.index'),
    (r'^index.html', 'menubuilder.views.index'),
    
    #Files
    (r'^file/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/(?P<files>[\w.-/]+)', 'menubuilder.views.files'), 
    
    #Tools
    (r'^custom/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/(?P<tool>[\w.-]+)', 'menubuilder.views.tools'), 

    #Console
    (r'^console/', 'menubuilder.views.console'),
    
    #Preseed
    (r'^preseed/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/(?P<preseed>[\w.-]+)', 'menubuilder.views.preseeds'),
    
    #Boot Menus
    (r'^menu/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/(?P<menu>[\w.-]+)', 'menubuilder.views.menu'),

    #Extras
    (r'^gpxe/', 'menubuilder.views.gpxe'),
    
    #Crap below
    #----------------------------
    #(r'^index.html', 'menubuilder.views.console'),
    #(r'^pxelinux.0', 'menubuilder.views.pxelinux'),
    #(r'^pxelinux.cfg/default', 'menubuilder.views.default'),
    #(r'^vesamenu.c32', 'menubuilder.views.vesamenu'),
    #(r'^memtest/memtest86+-4.10.x86', 'menubuilder.views.memtest'),
    
    ##Start with personalized menus
    #(r'^custom/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/pxelinux.0', 'menubuilder.views.custom'), 
    #(r'^custom/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/pxelinux.cfg/default', 'menubuilder.views.customDefault'),
    #(r'^custom/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/vesamenu.c32', 'menubuilder.views.customVesa'),
    #(r'^custom/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/memtest/memtest86-4.10.x86', 'menubuilder.views.memtest'),
    #(r'^custom/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/mem', 'menubuilder.views.mem'), #This should be generic
    #(r'^custom/(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/(?P<redir>[a-zA-Z0-9/-]+)/$', 'menubuilder.views.customRedirect'),
    
    ##Begin preseed stuff
    #(r'^preseed/', 'menubuilder.views.preseed'),
    #(r'^preseedMenu/', 'menubuilder.views.preseedMenu'),
    #(r'^ubuntu/lucid/linux', 'menubuilder.views.ubuntuKernel'),
    #(r'^ubuntu/lucid/initrd.gz', 'menubuilder.views.ubuntuInit'),
)